s = raw_input()
line_no = 0
while s is not None:
	print '%4d %s\n' % (line_no , s)
	line_no += 1
	try:
		s = raw_input()
	except EOFError:
		break

